<template>
  <div>
    <el-container>
      <el-aside width="auto"><Aside :getData="getList" /></el-aside>
      <el-container>
        <el-header><Header /></el-header>
        <el-main>
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Aside from "@/components/Aside/Aside.vue";
import Header from "@/components/Header/Header.vue";
import { reqmeun } from "@/api/user";

export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Main",
  data() {
    return {
      getList: [],
    };
  },
  mounted() {
    this.getMenu();
  },
  components: {
    Aside,
    Header,
  },
  methods: {
    //获取菜单列表信息
    async getMenu() {
      const res = await reqmeun();
      //console.log(res);
      this.getList = res.data.data;
      console.log(this.getList);
    },
  },
  computed: {},
  created() {},
};
</script>

<style lang="less" scoped>
.el-main {
  padding: 10px;
}
.el-header {
  padding: 0;
}
</style>
